const obj = {
    name: 'test'
}

const newProxy=new Proxy(obj, {
    get(targer, property) {
        return property in targer ? targer[property] : 'default'
    },
    set(targer, property, value) {
        targer[property] = value
        console.log(value)
    }
})
console.log(newProxy.name)
console.log(newProxy.xx)
newProxy.age=18
console.log(newProxy.age)